<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('service_store/index')}">服务点列表</a></li>
			<li class="active"><a>编辑服务点</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('service_store/edit')}">
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>服务点名称
				</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" name="name" value="{$row.name}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>服务点地址
				</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" name="address" value="{$row.address}">
					<a onclick="doSelectLocation(this)">选择地址</a>
					<input type="hidden" name="lat" value="{$row.lat}">
					<input type="hidden" name="lng" value="{$row.lng}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-r equired">*</span>服务时间点
				</label>
				<div class="col-md-2 col-sm-6">
					<input type="text" class="form-control" name="business_hours" value="{$row.business_hours}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>联系方式
				</label>
				<div class="col-md-2 col-sm-6">
					<input type="text" class="form-control" name="telephone" value="{$row.telephone}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>状态
				</label>
				<div class="col-md-6 col-sm-10">
	                <label class="radio-inline">
	                    <input type="radio" name="status" value="1" checked>启用
	                </label>
	                <label class="radio-inline">
	                    <input type="radio" name="status" value="2">关闭
	                </label>
	            </div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="{$row.id}">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script type="text/javascript">
	function doSelectLocation(obj) {
        var $obj       = $(obj);
        var title      = $obj.data('title');
        var $realInput = $obj;
        var location   = $realInput.val();

        openIframeLayer(
            "{:url('service_store/map')}?location=" + location,
            '选择定位',
            {
                area: ['700px', '90%'],
            }
        );
    }
	</script>
</body>
</html>